package com.warm.pump.module.skd.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.skd.bean.po.gen.ScheduleJobDtl;
import com.warm.pump.module.skd.mapper.gen.ScheduleJobDtlMapper;
import com.warm.pump.module.skd.bean.po.gen.ScheduleJobDtlExample;

@Repository
public class ScheduleJobDtlDao {
    // 日志对象
    private transient Log log = LogFactory.getLog(this.getClass());
    @Autowired
    private ScheduleJobDtlMapper scheduleJobDtlMapper;

    // 增加一个后台ScheduleJobDtl表

    public boolean insert(ScheduleJobDtl scheduleJobDtl) {
        try {
            scheduleJobDtlMapper.insert(scheduleJobDtl);
            log.debug("后台ScheduleJobDtl表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl表增加失败");
            throw new ServiceException("后台ScheduleJobDtl表增加失败", e);
        }
    }
    // 增加一个后台ScheduleJobDtl表Selective

    public boolean insertSelective(ScheduleJobDtl scheduleJobDtl) {
        try {
            scheduleJobDtlMapper.insertSelective(scheduleJobDtl);
            log.debug("后台ScheduleJobDtl表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl表增加失败");
            throw new ServiceException("后台ScheduleJobDtl表增加失败", e);
        }
    }

    // 删除一个后台ScheduleJobDtl表

    public boolean deleteByPrimaryKey(String id) {
        try {
            scheduleJobDtlMapper.deleteByPrimaryKey(id);
            log.debug("后台ScheduleJobDtl表删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl表删除失败");
            throw new ServiceException("后台ScheduleJobDtl表删除失败", e);
        }
    }
    // 删除一个后台ScheduleJobDtl表byMap

    public boolean deleteByMap(Map scheduleJobDtlMap) {
        try {
            scheduleJobDtlMapper.deleteByExample(createScheduleJobDtlExample(scheduleJobDtlMap, null, null));
            log.debug("后台ScheduleJobDtl根据Map删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl根据GroupID删除失败");
            throw new ServiceException("后台ScheduleJobDtl根据object删除失败", e);
        }
    }
    // 修改一个后台ScheduleJobDtl表

    public boolean updateByPrimaryKey(ScheduleJobDtl scheduleJobDtl) {
        try {
            scheduleJobDtlMapper.updateByPrimaryKey(scheduleJobDtl);
            log.debug("后台ScheduleJobDtl表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl表修改失败");
            throw new ServiceException("后台ScheduleJobDtl表修改失败", e);
        }
    }
    // 修改一个后台ScheduleJobDtl表Selective

    public boolean updateByPrimaryKeySelective(ScheduleJobDtl scheduleJobDtl) {
        try {
            scheduleJobDtlMapper.updateByPrimaryKeySelective(scheduleJobDtl);
            log.debug("后台ScheduleJobDtl表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台ScheduleJobDtl表修改失败");
            throw new ServiceException("后台ScheduleJobDtl表修改失败", e);
        }
    }
    // 修改一个后台ScheduleJobDtl表

    public boolean updateByMap(ScheduleJobDtl scheduleJobDtl, Map scheduleJobDtlMap) {
        try {
            scheduleJobDtlMapper.updateByExample(scheduleJobDtl, createScheduleJobDtlExample(scheduleJobDtlMap, null, null));
            log.debug("后台批量ScheduleJobDtl表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量ScheduleJobDtl表修改失败");
            throw new ServiceException("后台ScheduleJobDtl表批量修改失败", e);
        }
    }
    // 修改一个后台ScheduleJobDtl表Selective

    public boolean updateByMapSelective(ScheduleJobDtl scheduleJobDtl, Map scheduleJobDtlMap) {
        try {
            scheduleJobDtlMapper.updateByExampleSelective(scheduleJobDtl, createScheduleJobDtlExample(scheduleJobDtlMap, null, null));
            log.debug("后台批量ScheduleJobDtl表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量ScheduleJobDtl表修改失败");
            throw new ServiceException("后台ScheduleJobDtl表批量修改失败", e);
        }
    }

    // 查询一个后台ScheduleJobDtl表

    public ScheduleJobDtl selectByPrimaryKey(String id) {
        return scheduleJobDtlMapper.selectByPrimaryKey(id);
    }

    // 查询一个后台ScheduleJobDtl表-根据map

    public ScheduleJobDtl selectByMap(Map scheduleJobDtlMap) {
        List<ScheduleJobDtl> list = getListByMap(scheduleJobDtlMap);
        if (list == null || list.isEmpty()) {
            return null;
        } else {
            return list.get(0);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 查询所有后台ScheduleJobDtl表

    public List<ScheduleJobDtl> getListByMap(Map scheduleJobDtlMap) {

        return scheduleJobDtlMapper.selectByExample(createScheduleJobDtlExample(scheduleJobDtlMap, null, null));
    }

    //统计后台ScheduleJobDtl表数量

    public int countTotalByMap(Map scheduleJobDtlMap) {

        return scheduleJobDtlMapper.countByExample(createScheduleJobDtlExample(scheduleJobDtlMap, null, null));
    }


    public List<ScheduleJobDtl> getListByMapPage(Map scheduleJobDtlMap, int limitStart,
                                                 int limitOffset) {

        return scheduleJobDtlMapper.selectByExample(createScheduleJobDtlExample(scheduleJobDtlMap, limitStart, limitOffset));
    }


    public PageBean getPageBeanByMap(Map scheduleJobDtlMap, int pageNo, int pageSize) {
        Integer count = countTotalByMap(scheduleJobDtlMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        int limitStart = pageBean.getStartNo();
        int limitOffset = pageSize;
        pageBean.setData(scheduleJobDtlMapper.selectByExample(createScheduleJobDtlExample(scheduleJobDtlMap, limitStart, limitOffset)));
        return pageBean;
    }

    private ScheduleJobDtlExample createScheduleJobDtlExample(Map scheduleJobDtlMap, Integer limitStart, Integer limitOffset) {
        ScheduleJobDtlExample scheduleJobDtlEx = new ScheduleJobDtlExample();
        ScheduleJobDtlExample.Criteria c = scheduleJobDtlEx.createCriteria();
        String id_null = TypeCast.getString(scheduleJobDtlMap.get("id_null"));
        String id_notNull = TypeCast.getString(scheduleJobDtlMap.get("id_notNull"));
        String id = TypeCast.getString(scheduleJobDtlMap.get("id"));
        String id_not = TypeCast.getString(scheduleJobDtlMap.get("id_not"));
        String id_greater = TypeCast.getString(scheduleJobDtlMap.get("id_greater"));
        String id_greaterEqual = TypeCast.getString(scheduleJobDtlMap.get("id_greaterEqual"));
        String id_less = TypeCast.getString(scheduleJobDtlMap.get("id_less"));
        String id_lessEqual = TypeCast.getString(scheduleJobDtlMap.get("id_lessEqual"));
        String id_like = TypeCast.getString(scheduleJobDtlMap.get("id_like"));
        String id_notLike = TypeCast.getString(scheduleJobDtlMap.get("id_notLike"));
        List<String> id_in = TypeCast.getStringList(scheduleJobDtlMap.get("id_in"));
        List<String> id_notIn = TypeCast.getStringList(scheduleJobDtlMap.get("id_notIn"));
        String id_between1 = TypeCast.getString(scheduleJobDtlMap.get("id_between1"));
        String id_between2 = TypeCast.getString(scheduleJobDtlMap.get("id_between2"));
        String id_notBetween1 = TypeCast.getString(scheduleJobDtlMap.get("id_notBetween1"));
        String id_notBetween2 = TypeCast.getString(scheduleJobDtlMap.get("id_notBetween2"));

        if (id_null != null) {
            c.andIdIsNull();
        }
        if (id_notNull != null) {
            c.andIdIsNotNull();
        }
        if (id != null) {
            c.andIdEqualTo(id);
        }
        if (id_not != null) {
            c.andIdNotEqualTo(id_not);
        }
        if (id_greater != null) {
            c.andIdGreaterThan(id_greater);
        }
        if (id_greaterEqual != null) {
            c.andIdGreaterThanOrEqualTo(id_greaterEqual);
        }
        if (id_less != null) {
            c.andIdLessThan(id_less);
        }
        if (id_lessEqual != null) {
            c.andIdLessThanOrEqualTo(id_lessEqual);
        }
        if (id_like != null) {
            c.andIdLike(id_like);
        }
        if (id_notLike != null) {
            c.andIdNotLike(id_notLike);
        }
        if (id_in != null) {
            c.andIdIn(id_in);
        }
        if (id_notIn != null) {
            c.andIdNotIn(id_notIn);
        }
        if (id_between1 != null) {
            c.andIdBetween(id_between1, id_between2);
        }
        if (id_notBetween1 != null) {
            c.andIdNotBetween(id_notBetween1, id_notBetween2);
        }
        Long jobId_null = TypeCast.getLong(scheduleJobDtlMap.get("jobId_null"));
        Long jobId_notNull = TypeCast.getLong(scheduleJobDtlMap.get("jobId_notNull"));
        Long jobId = TypeCast.getLong(scheduleJobDtlMap.get("jobId"));
        Long jobId_not = TypeCast.getLong(scheduleJobDtlMap.get("jobId_not"));
        Long jobId_greater = TypeCast.getLong(scheduleJobDtlMap.get("jobId_greater"));
        Long jobId_greaterEqual = TypeCast.getLong(scheduleJobDtlMap.get("jobId_greaterEqual"));
        Long jobId_less = TypeCast.getLong(scheduleJobDtlMap.get("jobId_less"));
        Long jobId_lessEqual = TypeCast.getLong(scheduleJobDtlMap.get("jobId_lessEqual"));
        List<Long> jobId_in = TypeCast.getLongList(scheduleJobDtlMap.get("jobId_in"));
        List<Long> jobId_notIn = TypeCast.getLongList(scheduleJobDtlMap.get("jobId_notIn"));
        Long jobId_between1 = TypeCast.getLong(scheduleJobDtlMap.get("jobId_between1"));
        Long jobId_between2 = TypeCast.getLong(scheduleJobDtlMap.get("jobId_between2"));
        Long jobId_notBetween1 = TypeCast.getLong(scheduleJobDtlMap.get("jobId_notBetween1"));
        Long jobId_notBetween2 = TypeCast.getLong(scheduleJobDtlMap.get("jobId_notBetween2"));

        if (jobId_null != null) {
            c.andJobIdIsNull();
        }
        if (jobId_notNull != null) {
            c.andJobIdIsNotNull();
        }
        if (jobId != null) {
            c.andJobIdEqualTo(jobId);
        }
        if (jobId_not != null) {
            c.andJobIdNotEqualTo(jobId_not);
        }
        if (jobId_greater != null) {
            c.andJobIdGreaterThan(jobId_greater);
        }
        if (jobId_greaterEqual != null) {
            c.andJobIdGreaterThanOrEqualTo(jobId_greaterEqual);
        }
        if (jobId_less != null) {
            c.andJobIdLessThan(jobId_less);
        }
        if (jobId_lessEqual != null) {
            c.andJobIdLessThanOrEqualTo(jobId_lessEqual);
        }
        if (jobId_in != null) {
            c.andJobIdIn(jobId_in);
        }
        if (jobId_notIn != null) {
            c.andJobIdNotIn(jobId_notIn);
        }
        if (jobId_between1 != null) {
            c.andJobIdBetween(jobId_between1, jobId_between2);
        }
        if (jobId_notBetween1 != null) {
            c.andJobIdNotBetween(jobId_notBetween1, jobId_notBetween2);
        }
        String type_null = TypeCast.getString(scheduleJobDtlMap.get("type_null"));
        String type_notNull = TypeCast.getString(scheduleJobDtlMap.get("type_notNull"));
        String type = TypeCast.getString(scheduleJobDtlMap.get("type"));
        String type_not = TypeCast.getString(scheduleJobDtlMap.get("type_not"));
        String type_greater = TypeCast.getString(scheduleJobDtlMap.get("type_greater"));
        String type_greaterEqual = TypeCast.getString(scheduleJobDtlMap.get("type_greaterEqual"));
        String type_less = TypeCast.getString(scheduleJobDtlMap.get("type_less"));
        String type_lessEqual = TypeCast.getString(scheduleJobDtlMap.get("type_lessEqual"));
        String type_like = TypeCast.getString(scheduleJobDtlMap.get("type_like"));
        String type_notLike = TypeCast.getString(scheduleJobDtlMap.get("type_notLike"));
        List<String> type_in = TypeCast.getStringList(scheduleJobDtlMap.get("type_in"));
        List<String> type_notIn = TypeCast.getStringList(scheduleJobDtlMap.get("type_notIn"));
        String type_between1 = TypeCast.getString(scheduleJobDtlMap.get("type_between1"));
        String type_between2 = TypeCast.getString(scheduleJobDtlMap.get("type_between2"));
        String type_notBetween1 = TypeCast.getString(scheduleJobDtlMap.get("type_notBetween1"));
        String type_notBetween2 = TypeCast.getString(scheduleJobDtlMap.get("type_notBetween2"));

        if (type_null != null) {
            c.andTypeIsNull();
        }
        if (type_notNull != null) {
            c.andTypeIsNotNull();
        }
        if (type != null) {
            c.andTypeEqualTo(type);
        }
        if (type_not != null) {
            c.andTypeNotEqualTo(type_not);
        }
        if (type_greater != null) {
            c.andTypeGreaterThan(type_greater);
        }
        if (type_greaterEqual != null) {
            c.andTypeGreaterThanOrEqualTo(type_greaterEqual);
        }
        if (type_less != null) {
            c.andTypeLessThan(type_less);
        }
        if (type_lessEqual != null) {
            c.andTypeLessThanOrEqualTo(type_lessEqual);
        }
        if (type_like != null) {
            c.andTypeLike(type_like);
        }
        if (type_notLike != null) {
            c.andTypeNotLike(type_notLike);
        }
        if (type_in != null) {
            c.andTypeIn(type_in);
        }
        if (type_notIn != null) {
            c.andTypeNotIn(type_notIn);
        }
        if (type_between1 != null) {
            c.andTypeBetween(type_between1, type_between2);
        }
        if (type_notBetween1 != null) {
            c.andTypeNotBetween(type_notBetween1, type_notBetween2);
        }
        Long workId_null = TypeCast.getLong(scheduleJobDtlMap.get("workId_null"));
        Long workId_notNull = TypeCast.getLong(scheduleJobDtlMap.get("workId_notNull"));
        Long workId = TypeCast.getLong(scheduleJobDtlMap.get("workId"));
        Long workId_not = TypeCast.getLong(scheduleJobDtlMap.get("workId_not"));
        Long workId_greater = TypeCast.getLong(scheduleJobDtlMap.get("workId_greater"));
        Long workId_greaterEqual = TypeCast.getLong(scheduleJobDtlMap.get("workId_greaterEqual"));
        Long workId_less = TypeCast.getLong(scheduleJobDtlMap.get("workId_less"));
        Long workId_lessEqual = TypeCast.getLong(scheduleJobDtlMap.get("workId_lessEqual"));
        List<Long> workId_in = TypeCast.getLongList(scheduleJobDtlMap.get("workId_in"));
        List<Long> workId_notIn = TypeCast.getLongList(scheduleJobDtlMap.get("workId_notIn"));
        Long workId_between1 = TypeCast.getLong(scheduleJobDtlMap.get("workId_between1"));
        Long workId_between2 = TypeCast.getLong(scheduleJobDtlMap.get("workId_between2"));
        Long workId_notBetween1 = TypeCast.getLong(scheduleJobDtlMap.get("workId_notBetween1"));
        Long workId_notBetween2 = TypeCast.getLong(scheduleJobDtlMap.get("workId_notBetween2"));

        if (workId_null != null) {
            c.andWorkIdIsNull();
        }
        if (workId_notNull != null) {
            c.andWorkIdIsNotNull();
        }
        if (workId != null) {
            c.andWorkIdEqualTo(workId);
        }
        if (workId_not != null) {
            c.andWorkIdNotEqualTo(workId_not);
        }
        if (workId_greater != null) {
            c.andWorkIdGreaterThan(workId_greater);
        }
        if (workId_greaterEqual != null) {
            c.andWorkIdGreaterThanOrEqualTo(workId_greaterEqual);
        }
        if (workId_less != null) {
            c.andWorkIdLessThan(workId_less);
        }
        if (workId_lessEqual != null) {
            c.andWorkIdLessThanOrEqualTo(workId_lessEqual);
        }
        if (workId_in != null) {
            c.andWorkIdIn(workId_in);
        }
        if (workId_notIn != null) {
            c.andWorkIdNotIn(workId_notIn);
        }
        if (workId_between1 != null) {
            c.andWorkIdBetween(workId_between1, workId_between2);
        }
        if (workId_notBetween1 != null) {
            c.andWorkIdNotBetween(workId_notBetween1, workId_notBetween2);
        }
        String pid_null = TypeCast.getString(scheduleJobDtlMap.get("pid_null"));
        String pid_notNull = TypeCast.getString(scheduleJobDtlMap.get("pid_notNull"));
        String pid = TypeCast.getString(scheduleJobDtlMap.get("pid"));
        String pid_not = TypeCast.getString(scheduleJobDtlMap.get("pid_not"));
        String pid_greater = TypeCast.getString(scheduleJobDtlMap.get("pid_greater"));
        String pid_greaterEqual = TypeCast.getString(scheduleJobDtlMap.get("pid_greaterEqual"));
        String pid_less = TypeCast.getString(scheduleJobDtlMap.get("pid_less"));
        String pid_lessEqual = TypeCast.getString(scheduleJobDtlMap.get("pid_lessEqual"));
        String pid_like = TypeCast.getString(scheduleJobDtlMap.get("pid_like"));
        String pid_notLike = TypeCast.getString(scheduleJobDtlMap.get("pid_notLike"));
        List<String> pid_in = TypeCast.getStringList(scheduleJobDtlMap.get("pid_in"));
        List<String> pid_notIn = TypeCast.getStringList(scheduleJobDtlMap.get("pid_notIn"));
        String pid_between1 = TypeCast.getString(scheduleJobDtlMap.get("pid_between1"));
        String pid_between2 = TypeCast.getString(scheduleJobDtlMap.get("pid_between2"));
        String pid_notBetween1 = TypeCast.getString(scheduleJobDtlMap.get("pid_notBetween1"));
        String pid_notBetween2 = TypeCast.getString(scheduleJobDtlMap.get("pid_notBetween2"));

        if (pid_null != null) {
            c.andPidIsNull();
        }
        if (pid_notNull != null) {
            c.andPidIsNotNull();
        }
        if (pid != null) {
            c.andPidEqualTo(pid);
        }
        if (pid_not != null) {
            c.andPidNotEqualTo(pid_not);
        }
        if (pid_greater != null) {
            c.andPidGreaterThan(pid_greater);
        }
        if (pid_greaterEqual != null) {
            c.andPidGreaterThanOrEqualTo(pid_greaterEqual);
        }
        if (pid_less != null) {
            c.andPidLessThan(pid_less);
        }
        if (pid_lessEqual != null) {
            c.andPidLessThanOrEqualTo(pid_lessEqual);
        }
        if (pid_like != null) {
            c.andPidLike(pid_like);
        }
        if (pid_notLike != null) {
            c.andPidNotLike(pid_notLike);
        }
        if (pid_in != null) {
            c.andPidIn(pid_in);
        }
        if (pid_notIn != null) {
            c.andPidNotIn(pid_notIn);
        }
        if (pid_between1 != null) {
            c.andPidBetween(pid_between1, pid_between2);
        }
        if (pid_notBetween1 != null) {
            c.andPidNotBetween(pid_notBetween1, pid_notBetween2);
        }
        Integer execNum_null = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_null"));
        Integer execNum_notNull = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_notNull"));
        Integer execNum = TypeCast.getInteger(scheduleJobDtlMap.get("execNum"));
        Integer execNum_not = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_not"));
        Integer execNum_greater = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_greater"));
        Integer execNum_greaterEqual = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_greaterEqual"));
        Integer execNum_less = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_less"));
        Integer execNum_lessEqual = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_lessEqual"));
        List<Integer> execNum_in = TypeCast.getIntegerList(scheduleJobDtlMap.get("execNum_in"));
        List<Integer> execNum_notIn = TypeCast.getIntegerList(scheduleJobDtlMap.get("execNum_notIn"));
        Integer execNum_between1 = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_between1"));
        Integer execNum_between2 = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_between2"));
        Integer execNum_notBetween1 = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_notBetween1"));
        Integer execNum_notBetween2 = TypeCast.getInteger(scheduleJobDtlMap.get("execNum_notBetween2"));

        if (execNum_null != null) {
            c.andExecNumIsNull();
        }
        if (execNum_notNull != null) {
            c.andExecNumIsNotNull();
        }
        if (execNum != null) {
            c.andExecNumEqualTo(execNum);
        }
        if (execNum_not != null) {
            c.andExecNumNotEqualTo(execNum_not);
        }
        if (execNum_greater != null) {
            c.andExecNumGreaterThan(execNum_greater);
        }
        if (execNum_greaterEqual != null) {
            c.andExecNumGreaterThanOrEqualTo(execNum_greaterEqual);
        }
        if (execNum_less != null) {
            c.andExecNumLessThan(execNum_less);
        }
        if (execNum_lessEqual != null) {
            c.andExecNumLessThanOrEqualTo(execNum_lessEqual);
        }
        if (execNum_in != null) {
            c.andExecNumIn(execNum_in);
        }
        if (execNum_notIn != null) {
            c.andExecNumNotIn(execNum_notIn);
        }
        if (execNum_between1 != null) {
            c.andExecNumBetween(execNum_between1, execNum_between2);
        }
        if (execNum_notBetween1 != null) {
            c.andExecNumNotBetween(execNum_notBetween1, execNum_notBetween2);
        }
        Date createTime_null = TypeCast.getDate(scheduleJobDtlMap.get("createTime_null"));
        Date createTime_notNull = TypeCast.getDate(scheduleJobDtlMap.get("createTime_notNull"));
        Date createTime = TypeCast.getDate(scheduleJobDtlMap.get("createTime"));
        Date createTime_not = TypeCast.getDate(scheduleJobDtlMap.get("createTime_not"));
        Date createTime_greater = TypeCast.getDate(scheduleJobDtlMap.get("createTime_greater"));
        Date createTime_greaterEqual = TypeCast.getDate(scheduleJobDtlMap.get("createTime_greaterEqual"));
        Date createTime_less = TypeCast.getDate(scheduleJobDtlMap.get("createTime_less"));
        Date createTime_lessEqual = TypeCast.getDate(scheduleJobDtlMap.get("createTime_lessEqual"));
        List<Date> createTime_in = TypeCast.getDateList(scheduleJobDtlMap.get("createTime_in"));
        List<Date> createTime_notIn = TypeCast.getDateList(scheduleJobDtlMap.get("createTime_notIn"));
        Date createTime_between1 = TypeCast.getDate(scheduleJobDtlMap.get("createTime_between1"));
        Date createTime_between2 = TypeCast.getDate(scheduleJobDtlMap.get("createTime_between2"));
        Date createTime_notBetween1 = TypeCast.getDate(scheduleJobDtlMap.get("createTime_notBetween1"));
        Date createTime_notBetween2 = TypeCast.getDate(scheduleJobDtlMap.get("createTime_notBetween2"));

        if (createTime_null != null) {
            c.andCreateTimeIsNull();
        }
        if (createTime_notNull != null) {
            c.andCreateTimeIsNotNull();
        }
        if (createTime != null) {
            c.andCreateTimeEqualTo(createTime);
        }
        if (createTime_not != null) {
            c.andCreateTimeNotEqualTo(createTime_not);
        }
        if (createTime_greater != null) {
            c.andCreateTimeGreaterThan(createTime_greater);
        }
        if (createTime_greaterEqual != null) {
            c.andCreateTimeGreaterThanOrEqualTo(createTime_greaterEqual);
        }
        if (createTime_less != null) {
            c.andCreateTimeLessThan(createTime_less);
        }
        if (createTime_lessEqual != null) {
            c.andCreateTimeLessThanOrEqualTo(createTime_lessEqual);
        }
        if (createTime_in != null) {
            c.andCreateTimeIn(createTime_in);
        }
        if (createTime_notIn != null) {
            c.andCreateTimeNotIn(createTime_notIn);
        }
        if (createTime_between1 != null) {
            c.andCreateTimeBetween(createTime_between1, createTime_between2);
        }
        if (createTime_notBetween1 != null) {
            c.andCreateTimeNotBetween(createTime_notBetween1, createTime_notBetween2);
        }
        Date updateTime_null = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_null"));
        Date updateTime_notNull = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_notNull"));
        Date updateTime = TypeCast.getDate(scheduleJobDtlMap.get("updateTime"));
        Date updateTime_not = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_not"));
        Date updateTime_greater = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_greater"));
        Date updateTime_greaterEqual = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_greaterEqual"));
        Date updateTime_less = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_less"));
        Date updateTime_lessEqual = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_lessEqual"));
        List<Date> updateTime_in = TypeCast.getDateList(scheduleJobDtlMap.get("updateTime_in"));
        List<Date> updateTime_notIn = TypeCast.getDateList(scheduleJobDtlMap.get("updateTime_notIn"));
        Date updateTime_between1 = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_between1"));
        Date updateTime_between2 = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_between2"));
        Date updateTime_notBetween1 = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_notBetween1"));
        Date updateTime_notBetween2 = TypeCast.getDate(scheduleJobDtlMap.get("updateTime_notBetween2"));

        if (updateTime_null != null) {
            c.andUpdateTimeIsNull();
        }
        if (updateTime_notNull != null) {
            c.andUpdateTimeIsNotNull();
        }
        if (updateTime != null) {
            c.andUpdateTimeEqualTo(updateTime);
        }
        if (updateTime_not != null) {
            c.andUpdateTimeNotEqualTo(updateTime_not);
        }
        if (updateTime_greater != null) {
            c.andUpdateTimeGreaterThan(updateTime_greater);
        }
        if (updateTime_greaterEqual != null) {
            c.andUpdateTimeGreaterThanOrEqualTo(updateTime_greaterEqual);
        }
        if (updateTime_less != null) {
            c.andUpdateTimeLessThan(updateTime_less);
        }
        if (updateTime_lessEqual != null) {
            c.andUpdateTimeLessThanOrEqualTo(updateTime_lessEqual);
        }
        if (updateTime_in != null) {
            c.andUpdateTimeIn(updateTime_in);
        }
        if (updateTime_notIn != null) {
            c.andUpdateTimeNotIn(updateTime_notIn);
        }
        if (updateTime_between1 != null) {
            c.andUpdateTimeBetween(updateTime_between1, updateTime_between2);
        }
        if (updateTime_notBetween1 != null) {
            c.andUpdateTimeNotBetween(updateTime_notBetween1, updateTime_notBetween2);
        }
        if (scheduleJobDtlMap.get("orderBy") != null) {
            scheduleJobDtlEx.setOrderByClause((String) scheduleJobDtlMap.get("orderBy"));
        }
        if (limitStart != null && limitOffset != null) {
            scheduleJobDtlEx.setLimitStart(limitStart);
            scheduleJobDtlEx.setLimitOffset(limitOffset);
        }

        return scheduleJobDtlEx;
    }
}
